<?php
namespace app\admin\validate;

use think\Validate;
// session_start();
class Coupon extends Validate
{
    protected $rule = [
                        //表单名,表单里面的字段名
        'coupon_name'  =>  'require',
        'coupon_money'  =>'require',
        'min_amount'  =>'require',
        'max_amount'  =>'require',
        'send_start_time'  =>'require',
        'send_end_time'  =>'require',
        'use_start_time'  =>'require',
        'use_end_time'  =>'require',
        'coupon_data'  =>'require',

    ];
    protected $message  =   [
        'coupon_name.require'  =>  '优惠劵名称必须填写',
        'coupon_money.require'  =>'优惠劵金额必须填写',
        'min_amount.require'  =>'优惠劵使用最小金额必须填写',
        'max_amount.require'  =>'优惠劵使用最大金额必须填写',
        'send_start_time.require'  =>'优惠劵发送起始时间必须填写',
        'send_end_time.require'  =>'优惠劵发送截止时间必须填写',
        'use_start_time.require'  =>'优惠劵使用起始时间必须填写',
        'use_end_time.require'  =>'优惠劵使用截止时间必须填写',
        'coupon_data.require'  =>'优惠劵描述必须填写',

    ];

}